|
![](/i/fill.gif) |
On Sun, 18 Apr 1999 22:39:41 +0100, "Andrew Cocker"
<and### [at] acocker freeserve co uk> wrote:
>Hi,
>
>Starting with the following code:
>
>sphere {
> <0,0,0>,1
> scale <0.25,1,0.25>
> translate <-0.5,0,0>
> texture { MyTexture }
>}
>
>plane
>
> y, -1
> texture { MyTexture }
>}
>
>I wish to rotate the sphere clockwise on the z axis by 180 degrees, at the same time
>translating it along the x axis by 1 unit, so that it ends up at <0.5,0,0>.
>The question is, how do I mathematically model the vertical motion so that the shape
>appears to be rolling along the plane?NOTE: I may wish to alter the scale of the
shape
>*during* the anim, so this must be taken into account in the equation.
>
>Any help appreciated.
Now, a 180 degrees' roll of this objects makes for a x translation of
3.14159265, if you want it to roll correctly. If I understand your
question correctly, you are trying to model the behaviour of, say, an
unrolling rug, right? I mean, it moves, rolls, gets smaller, and stays
on the ground all at the same time.
The radius is a simple linear function:
r(clock) = startRad - clock*(startRad - endRad).
The y coordinate of the center is -1 + radius.
The x coordinate is found by integrating 2*pi*r(clock)*dclock in the
range from 0 to clock.
Am I getting the problem right? Is this of any help?
---------
Peter Popov
ICQ: 15002700
Post a reply to this message
|
![](/i/fill.gif) |